Currently, an electronic device generally has a plurality of connection ports for connecting the electronic device to a variety of external devices. Take notebook computer as an example, connection ports generally at least include a universal serial bus (USB) port, an RJ45 connection port and an audio connection port. Since these connection ports are exposed to the atmosphere when not in use, conventional dustproof devices may be used to protect the connection ports against dirt and moisture.